/**
 * @author SilverBiology, LLC
 * @website http://code.google.com/p/gbif-spreadsheet-processor/
*/
Ext.namespace('GBIF');
Ext.namespace('GBIF.GeoSpatial')

GBIF.GeoSpatial.Summary = function(config){
		
	Ext.apply(this,config, {	
			autoWidth:'true'
		,	scope:this
		,	height:500
		,	bodyStyle:"padding:15px"
		,	items:[{
				xtype:'button'
			,	text:'Get Summary'
			,	scope:this
			,	style:"padding:0px 0px 15px 0px"
			,	handler:this.summary	
		},{
				xtype:'textfield'
			,	fieldLabel:'Selected Type '	
			,	readOnly:'true'
		},{
				xtype:'textfield'
			,	fieldLabel:'URL '	
		},{
				xtype:'textfield'
			,	fieldLabel:'Name '	
		},{
				xtype:'textfield'
			,	fieldLabel:'Description '	
		}]
	})

	GBIF.GeoSpatial.Summary.superclass.constructor.call(this, config)
}

Ext.extend(GBIF.GeoSpatial.Summary,Ext.form.FormPanel, {
				
		summary:function(){
			var arr = this.ownerCt.items.items[0].ownerCt.arr;

			this.items.items[1].setValue(arr[0]);
			this.items.items[2].setValue(arr[1]);
			this.items.items[3].setValue(arr[2]);
			this.items.items[4].setValue(arr[3]);
		}

});